package co.com.smart.persistence.entity.dto;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the smart_eps database table.
 * 
 */
@Entity
@Table(name="smart_eps")
@NamedQuery(name="SmartEps.findAll", query="SELECT s FROM SmartEps s")
public class SmartEps implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="sm_sceps")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private BigDecimal smSceps;

	@Column(name="sm_coeps")
	private String smCoeps;

	@Column(name="sm_cousuario")
	private String smCousuario;

	@Column(name="sm_dseps")
	private String smDseps;

	@Temporal(TemporalType.DATE)
	@Column(name="sm_fhingreso")
	private Date smFhingreso;

	@Temporal(TemporalType.DATE)
	@Column(name="sm_fhmodificacion")
	private Date smFhmodificacion;

	@Temporal(TemporalType.DATE)
	@Column(name="sm_fhretiro")
	private Date smFhretiro;

	//bi-directional many-to-one association to SmartAfiliacion
	@OneToMany(cascade = CascadeType.ALL ,mappedBy="smartEps", fetch = FetchType.LAZY)
	private List<SmartAfiliacion> smartAfiliacions;

	public SmartEps() {
	}

	public BigDecimal getSmSceps() {
		return this.smSceps;
	}

	public void setSmSceps(BigDecimal smSceps) {
		this.smSceps = smSceps;
	}

	public String getSmCoeps() {
		return this.smCoeps;
	}

	public void setSmCoeps(String smCoeps) {
		this.smCoeps = smCoeps;
	}

	public String getSmCousuario() {
		return this.smCousuario;
	}

	public void setSmCousuario(String smCousuario) {
		this.smCousuario = smCousuario;
	}

	public String getSmDseps() {
		return this.smDseps;
	}

	public void setSmDseps(String smDseps) {
		this.smDseps = smDseps;
	}

	public Date getSmFhingreso() {
		return this.smFhingreso;
	}

	public void setSmFhingreso(Date smFhingreso) {
		this.smFhingreso = smFhingreso;
	}

	public Date getSmFhmodificacion() {
		return this.smFhmodificacion;
	}

	public void setSmFhmodificacion(Date smFhmodificacion) {
		this.smFhmodificacion = smFhmodificacion;
	}

	public Date getSmFhretiro() {
		return this.smFhretiro;
	}

	public void setSmFhretiro(Date smFhretiro) {
		this.smFhretiro = smFhretiro;
	}

	public List<SmartAfiliacion> getSmartAfiliacions() {
		return this.smartAfiliacions;
	}

	public void setSmartAfiliacions(List<SmartAfiliacion> smartAfiliacions) {
		this.smartAfiliacions = smartAfiliacions;
	}

	public SmartAfiliacion addSmartAfiliacion(SmartAfiliacion smartAfiliacion) {
		getSmartAfiliacions().add(smartAfiliacion);
		smartAfiliacion.setSmartEps(this);

		return smartAfiliacion;
	}

	public SmartAfiliacion removeSmartAfiliacion(SmartAfiliacion smartAfiliacion) {
		getSmartAfiliacions().remove(smartAfiliacion);
		smartAfiliacion.setSmartEps(null);

		return smartAfiliacion;
	}

}